<%
page = CInt(SelfRequestNumber("page"))
st=request("st")
select case st
case ""
if page = 0 then
	strSQL = "select top 8 * from GameClub order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub ORDER BY Hot desc)) ORDER BY Hot desc"
end if
case "lw"
if page = 0 then
	strSQL = "select top 8 * from GameClub where area='荔湾区' order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE area='荔湾区' and ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub where area='荔湾区')) ORDER BY Hot desc"
end if
case "yx"
if page = 0 then
	strSQL = "select top 8 * from GameClub where area='越秀区' order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE area='越秀区' and ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub WHERE area='越秀区')) ORDER BY Hot desc"
end if
case "by"
if page = 0 then
	strSQL = "select top 8 * from GameClub where area='白云区' order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE area='白云区' and ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub WHERE area='白云区')) ORDER BY Hot desc"
end if
case "fc"
if page = 0 then
	strSQL = "select top 8 * from GameClub where area='芳村区' order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE area='芳村区' and ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub WHERE area='芳村区')) ORDER BY Hot desc"
end if
case "hz"
if page = 0 then
	strSQL = "select top 8 * from GameClub where area='海珠区' order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE area='海珠区' and ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub WHERE area='海珠区')) ORDER BY Hot desc"
end if
case "th"
if page = 0 then
	strSQL = "select top 8 * from GameClub where area='天河区' order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE area='天河区' and ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub WHERE area='天河区')) ORDER BY Hot desc"
end if
case "py"
if page = 0 then
	strSQL = "select top 8 * from GameClub where area='番禺区' order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE area='番禺区' and ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub WHERE area='番禺区')) ORDER BY Hot desc"
end if
case "hd"
if page = 0 then
	strSQL = "select top 8 * from GameClub where area='花都区' order by Hot desc"
else
	strSQL = "SELECT TOP 8 * FROM GameClub WHERE area='花都区' and ( Hot NOT IN (SELECT TOP " & CStr(8 * page) & " Hot FROM GameClub WHERE area='花都区')) ORDER BY Hot desc"
end if

end select
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, dbconnection, adOpenDynamic, 3
Dim TextArray1(8)
Dim PicArray1(8)
bNext = True

for i = 0 to ubound(TextArray1) 
	if not rs.eof then
		PicArray1(i)="<A href=""clubvip/"&rs("URL")&".htm""><img src="""&rs("Pic")&""" border=""0"" width=""100"" height=""100"" alt="""" /></A>"
		TextArray1(i)="<A href=""clubvip/"&rs("URL")&".htm"">"&rs("Title")&"</A><br />地址："&rs("Addr")&"<br />电话："&rs("Tel")
		rs.movenext
	else
		TextArray1(i)="&nbsp;"
		PicArray1(i)="&nbsp;"
		bNext = False
	end if
next
set rs = nothing
%>
		<hr style="border:1px dashed black; height:1px;">
		<%if TextArray1(0) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(0)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(0)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(1) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(1)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(1)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(2) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(2)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(2)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(3) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(3)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(3)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(4) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(4)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(4)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(5) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(5)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(5)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(6) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(6)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(6)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(7) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(7)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(7)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<div class="TableRow">
		<%if page > 0 then%>
		<a href="gameclub.asp?page=<%=page-1%>&st=<%=st%>">
		<%end if%>
		上一页
		<%if page > 0 then%>
		</a>
		<%end if%>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<%if bNext = True then%>
		<a href="gameclub.asp?page=<%=page+1%>&st=<%=st%>">
		<%end if%>
		下一页
		<%if bNext = True then%>
		</a>
		<%end if%>
		</div>
		<hr style="border:1px dashed black; height:1px;">